import request from '@/utils/request'

/** 支付方式*/
export function listPayType(data) {
  return request({
    url: '/ims/payment/page', method: 'get', params: data
  })
}

export function addPayType(data) {
  return request({
    url: '/ims/payment/save', method: 'post', data: data
  })
}

export function deletePayType(data) {
  return request({
    url: '/ims/payment/delete', method: 'post', data: data
  })
}

export function updatePayType(data) {
  return request({
    url: '/ims/payment/edit', method: 'post', data: data
  })
}

export function changePayType(data) {
  return request({
    url: '/ims/payment/enable', method: 'post', data: data
  })
}

/** 收款单*/
export function listPayOrder(data) {
  return request({
    url: '/ims/receipt/docs/page', method: 'get', params: data
  })
}

export function getPayOrderCode(data) {
  return request({
    url: '/ims/receipt/docs/get/order/no', method: 'get', params: data
  })
}

export function addPayOrder(data) {
  return request({
    url: '/ims/receipt/docs/save', method: 'post', data: data
  })
}

export function updatePayOrder(data) {
  return request({
    url: '/ims/receipt/docs/edit', method: 'post', data: data
  })
}

export function getPayOrder(data) {
  return request({
    url: '/ims/receipt/docs/detail/' + data, method: 'get', params: data
  })
}

export function deletePayOrder(data) {
  return request({
    url: '/ims/receipt/docs/delete', method: 'post', data: data
  })
}

export function listCustomOrder(data) {
  return request({
    url: '/ims/customer/order/getPaidOrder', method: 'post', data: data
  })
}
export function listCustomRelationOrder(data) {
  return request({
    url: '/ims/customer/order/reconciliation', method: 'get', params: data
  })
}
export function okPayOrder(data) {
  return request({
    url: '/ims/receipt/docs/pass', method: 'post', data: data
  })
}

export function noPayOrder(data) {
  return request({
    url: '/ims/receipt/docs/reject', method: 'post', data: data
  })
}

/** 应收事项*/
export function listPayList(data) {
  return request({
    url: '/ims/receipt/matters/page', method: 'get', params: data
  })
}

/** 对账单*/
export function listPayCheck(data) {
  return request({
    url: '/ims/recon/page', method: 'get', params: data
  })
}
export function getPayCheck(data) {
  return request({
    url: '/ims/recon/detail/'+data, method: 'get'
  })
}
export function addPayCheck(data) {
  return request({
    url: '/ims/recon/save', method: 'post', data: data
  })
}
export function reloadPayCheck(data) {
  return request({
    url: '/ims/recon/generate', method: 'post', data: data
  })
}

export function updatePayCheck(data) {
  return request({
    url: '/ims/recon/edit', method: 'post', data: data
  })
}
export function deletePayCheck(data) {
  return request({
    url: '/ims/recon/delete', method: 'post', data: data
  })
}
export function okPayCheck(data) {
  return request({
    url: '/ims/recon/check', method: 'post', data: data
  })
}
export function okPayCheckFinance(data) {
  return request({
    url: '/ims/recon/finance/check', method: 'post', data: data
  })
}
export function noPayCheck(data) {
  return request({
    url: '/ims/recon/reject', method: 'post', data: data
  })
}
export function confirmPayCheck(data) {
  return request({
    url: '/ims/recon/confirm', method: 'post', data: data
  })
}

/** 收支明细*/
export function listCustomerTotal(data) {
  return request({
    url: '/ims/merchant/present/page', method: 'get', params: data
  })
}
export function listCashTotal(data) {
  return request({
    url: '/ims/finance/statistic/page', method: 'get', params: data
  })
}

export function listCashDetail(data) {
  return request({
    url: '/ims/finance/transaction/page', method: 'get', params: data
  })
}
